GBML manual / Drawing

flip_x

Mirrors the sprite left-right. Combines with a negative xscale by XOR, not by overriding it - both true at once cancels back to unmirrored.

Syntax

flip_x: bool

Description

Mirrors the sprite left-right, without touching xscale or claiming an affine matrix the way a negative scale would - the cheap, common way to reuse one walk-cycle sheet facing both directions instead of drawing it twice.

Example

flip_x = (btn_dx() < 0);

Faces left when the d-pad is held left, right otherwise (including while not moving at all horizontally) - the usual one-liner for a side-facing character.

A real capture - the arrow mirrored, now pointing west instead of its usual eastA real capture - the arrow mirrored, now pointing west instead of its usual east
A real capture - the arrow mirrored, now pointing west instead of its usual east
See also: xscale